package interface_test.animal;

import animal.D;

/**
 * @author yuisama
 * @date 2022/04/28 21:34
 **/
public class Test {
    public static void main(String[] args) {
        // 接口也不能直接实例化对象，需要向上转型
        IRun run = new Rabbit();
        IRun run1 = new Dog();
        ISWim sWim = new Dog();
        IFly fly = new Duck();
        run.run();
        run1.run();
        sWim.swim();
        fly.fly();
    }
}